import java.io.*;
class Factorial
{
	public static void main(java.lang.String[]args)
	{		
               try{
	BufferedReader object = new BufferedReader(new InputStreamReader(System.in));
	System.out.print("Enter the number : ");
	int a= Integer.parseInt(object.readLine());
	int fact= 1;			  
	for (int i= 1; i<=a; i++)
                   {
	     fact=fact*i;
	   }
	System.out.print("Factorial of " +a+ " = "+fact);
                }
                catch (Exception e){}		
	}
}
